package com.bodgittandscarper.broker.types;

import java.io.Serializable;

/**
 * Entity type that represents a Field in a Database. The field consists of a String specifying the 
 * name of the field and an int specifying the size. 
 * <p>
 * All DatabaseFields are instantiated when the Server reads the Database. As the database schema cannot change during 
 * runtime, the DatabasFields are immutable. 
 * <p>
 * DatabaseField objects are created with the {@link TypeFactory}.
 * 
 * @author Morten Rummelhoff
 *
 */
public interface DatabaseField extends Serializable {

	/** 
	 * Gets the name of this field. Field in the Database is defined in the Database schema.
	 * 
	 * @return the String representation of the fieldname 
	 */
	public String getFieldName();
	
	/**
	 *  int representation of the size of this field.
	 *  
	 * @return the size of the field.
	 */
	public int getFieldSize() ;
}
